-
Notifications
You must be signed in to change notification settings - Fork 0
Class17 hackernews1 #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: gh-pages
Are you sure you want to change the base?
Conversation
stu-k
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fetch/react stuff works just fine, but once again, your code is a mess. Fix it for a better grade.
| Component | ||
| } from 'react'; | ||
| import 'semantic-ui-css/semantic.min.css'; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace
|
|
||
|
|
||
| import './App.css'; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace
| // | ||
| // .catch(err => console.log(err)) | ||
| }) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace
| /div> < | ||
| /div> < | ||
| /div> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace
| // imgStyle | ||
| // } > | ||
| // < /div> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace
| } < /div> | ||
| // < /div> | ||
| ); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace
09week/hackernewsapp/src/App.js
Outdated
| if (links.length) { | ||
| console.log('what') | ||
| return links.map((article, key) => { | ||
| return ( < |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this mess? If you were given this code, would you be able to tell what was being rendered?
Here's the same code, but readable:
return (
<div>
<div class="ui left align container">
<div class="ui yellow segment">
<a href={article.url} key={key}>
{article.title}
</a>
</div>
</div>
</div>
)
Or, if you wanted to indent attributes within the html tags, it would look like this:
return (
<div>
<div
class="ui left align container"
>
<div
class="ui yellow segment"
>
<a
href={article.url}
key={key}
>
{article.title}
</a>
</div>
</div>
</div>
)
Checkpoint Rubric
This is the rubric that your instructor will use to grade your checkpoints. Please do not edit.
Checkpoint 1
Checkpoint 2
Checkpoint 3